package com.wine.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wine.exam.domain.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 题目Mapper接口
 *
 * @author wine
 * @date 2022-09-02
 */
@Mapper
public interface QuestionMapper extends BaseMapper<Question> {

    /**
     * 只更改状态
     *
     * @param questionId
     * @param status
     * @param updateBy
     * @return
     */
    int updateStatus(
            @Param("questionId") Long questionId,
            @Param("status") String status,
            @Param("updateBy") String updateBy);

    /**
     * 联查单个问题和学科
     *
     * @param questionId
     * @return
     */
    Question selectQuestionLeftSubjectById(@Param("questionId") Long questionId);


}